Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Android
1) 2D Graphics
2) Animation
3) Core Class
4) Database
5) Date Type
6) Development
7) File
8) Game
9) Hardware
10) Media
11) Network
12) Security
13) UI
14) User Event
UI
1) A dialog that allows the user to select multiple entries
2) A gallery of basic controls
3) A layout that arranges its children in a grid
4) A list view example where the data comes from a cursor
5) A list view example where the data comes from a cursor, and a SimpleCursorListAdapter is used to map each item to a two-line display.tx
6) A list view example where the data comes from a custom ListAdapter
7) A list view example where the data for the list comes from an array of strings
8) A list view example with separators
9) A list view that demonstrates the use of setEmptyView This example alos uses a custom layout file that adds some extra buttons to the s
10) A list view where the last item the user clicked is placed in the activated state, causing its background to highlight
11) A Simple Form
12) A simple layout which demonstrates stretching a view to fill the space between two other views
13) A simple linear layout fills the screen, with the children stacked from the top The middle child gets allocated any extra space
14) A wrapper class for the Android 2 2+ BackupHelper class
15) Activity configuration changed event
16) Activity key event
17) Activity lifecycle event
18) Activity Menu
19) Adapter that simply returns row views from a list
20) Add a client to the web view
21) Add a RadioGroup
22) Add android
23) Add Button from layout xml file
24) Add button on click listener
25) Add Button to Activity
26) Add key listener to add the new todo item when the middle D-pad button is pressed
27) Add listener to Toggle Button
28) Add option item to Alert dialog and get user selection result
29) Add some padding to keep the dialog borders away
30) Add Tab to TabHost
31) Add TextView and set text
32) Add TextView to LinearLayout
33) Adding a List
34) Adding a radio button programmatically
35) Adding Check listener to RadioGroup
36) Adding EditText to Activity
37) Adding SlidingDrawer to RelativeLayout
38) Adding submenu
39) Adding Touch Listener to ImageView
40) Adding two controls to LinearLayout
41) Adding view to TableLayout
42) Adding WebView to Activity, load URL and grab focus
43) AlertDialog Question
44) AlertDialog vs Toast
45) Align along with Parent
46) Allows the activity to manage the Cursors lifecyle based on the activitys lifecycle---
47) An example of tab content that launches an activity via android widget TabHost TabSpec#setContent(android content Intent)
48) Android
49) Append and set text to TextView
50) Auto complete Text view
51) AutoCompleteTextView 2
52) AutoCompleteTextView 3
53) Backup Activity
54) Bars View
55) BaseExpandableListAdapter Demo
56) Baseline alignment includes a android widget LinearLayout within another android widget LinearLayout
57) Baseline nested
58) Basic example of using date and time widgets, android app TimePickerDialog android widget DatePicker
59) Basics of the Action Bar and how it interoperates with the standard options menu
60) Bind Click Action Activity
61) Bounded Linked List
62) Brightness Slider
63) Button Gallery
64) Button on click event
65) Calculate the minimum and maximum values out of a list of doubles
66) Change color and size for EditText
67) Check activity result
68) Check Activity result and onActivityResult
69) Choose a Picture
70) Chronometer Demo
71) Clear RadioButton selection
72) Clearing the selection for RadioGroup
73) Code based TableLayout
74) Color Picker Dialog
75) Color Select Dialog
76) Comparing Android UI Elements to Swing UI Elements
77) Compass
78) Compass View
79) Config your own layout through xml
80) Context menu
81) Context Menu event
82) Convert input value to Currency in TextWatcher
83) CoverFlow extends Gallery
84) Create a user interface in code
85) Create an EditText widget and add the watcher
86) Create an image view, given a drawable you can set the max size of this imageview as well
87) Create Button
88) Create Chang Log Dialog
89) Create Edit Text
90) Create Image Button
91) Create ImageView
92) Create LayoutParam
93) Create Linear Layout
94) Create List
95) Create Menu within your code
96) Create MessageBox
97) Create Option menu
98) Create RadioGroup
99) Create scrollable panel with ScrollView
100) Create TextView
101) Create TextView within code
102) Create the user interface by inflating a layout resource
103) Create your own List
104) Custom cell Renderer for ListView
105) Custom menu
106) Define AnalogClock and DigitalClock in xml
107) Define menu in xml file
108) Demonstrates a horizontal linear layout with equally sized columns
109) Demonstrates a horizontal linear layout with equally sized columns Some columns force their height to match the parent
110) Demonstrates a nesting layouts to make a form
111) Demonstrates a simple linear layout The height of the layout is the sum of its children
112) Demonstrates a simple linear layout The layout fills the screen, with the children stacked from the top
113) Demonstrates expandable lists backed by a Simple Map-based adapter
114) Demonstrates expandable lists backed by Cursors
115) Demonstrates how a list can avoid expensive operations during scrolls or flings
116) Demonstrates how fragments can participate in the options menu
117) Demonstrates how the various soft input modes impact window resizing
118) Demonstrates how to show an AlertDialog that is managed by a Fragment
119) Demonstrates how to take over the Surface from a window to do direct drawing to it (without going through the view hierarchy)
120) Demonstrates how to use a rating bar
121) Demonstrates how to use a seek bar
122) Demonstrates how to write an efficient list adapter
123) Demonstrates inflating menus from XML
124) Demonstrates making a view VISIBLE, INVISIBLE and GONE
125) Demonstrates required behavior of saving and restoring dynamic activity state
126) Demonstrates scrolling with a ScrollView
127) Demonstrates setting size constraints on android widget ImageView
128) Demonstrates the use of non-focusable views
129) Demonstrates the use of progress dialogs
130) Demonstrates the using a list view in transcript mode
131) Demonstrates using a LinearLayout background to group related TextViews, EditTexts, and Buttons
132) Demonstrates using a relative layout to create a form
133) Demonstrates using nextFocusForward to explicitly set sequential focus order
134) Demonstrates using nextLeft, nextRight, nextUp and nextDown to get focus behavior that would be difficult with default focus
135) Demonstrates wrapping a layout in a ScrollView
136) Demonstration of displaying a context menu from a fragment
137) Demonstration of overlays placed on top of a SurfaceView
138) Demonstration of using fragments to implement different activity layouts
139) Dialog Activity
140) Dialog activity and TextView
141) Dialog Builder
142) Dialog Helper
143) Dialog layout
144) Dialog Multiple Choice
145) Dialog Multiple Choice Cursor
146) Dialog with List of value
147) Dialog with Progress
148) Dialog with Single Choice
149) Dialog with Text Entry
150) Dialog with Xml layout
151) Dialog Yes No Holo Light Message
152) Dialog Yes No Long Message
153) Dialog Yes No Message
154) Dialog Yes No Old School Message
155) Dialog Yes No Ultra Long Message
156) Diary app
157) DigitalClock and AnalogClock
158) Disable and enable Spinner
159) Display an alert dialog
160) Download images from the Internet and binds those with the provided ImageView
161) Drag and drop
162) Drag and move a dot
163) Draggable dot
164) Drawer demo
165) Dynamic List item
166) Dynamic Tab Demo
167) EditText focus event listener
168) Enable and disable RadioGroup
169) Enable Javascript for WebView
170) Error Dialog Wrapper
171) Example of how to use a custom title android view Window#FEATURE_CUSTOM_TITLE
172) Example of how to write a custom subclass of View
173) Example of receiving a result from another activity
174) Example of removing yourself from the history stack after forwarding to another activity
175) Extends Activity implements OnClickListener
176) Extends AdapterWrapper
177) Extends BaseExpandableListAdapter
178) Extends Button
179) Extends CursorAdapter implements Filterable
180) Extends DialogFragment
181) Extends DialogPreference
182) Extends FrameLayout
183) Extends ImageView
184) Extends MapView
185) Extends ScrollingMovementMethod
186) Extends TextView to create customized widget
187) Extends View to create customized User interface widget
188) Extends View to do drawing
189) Extends View to draw
190) Extends ViewGroup
191) Extends ViewGroup to do layout
192) Extends WebViewClient and check the url
193) External Storage Activity
194) Fancy Blur Activity
195) File open dialog
196) FileList extends ListView
197) Fill contact information to ListView
198) Fill data from arrays xml to Spinner
199) Fill data from arrays xml to Spinner and ArrayAdapter
200) Fill data to AutoCompleteTextView with ArrayAdapter
201) Fill data to Spinner with ArrayAdapter
202) Find user control by using findViewById
203) Flips the checkbox to unchecked if it was checked
204) Format number
205) Forward to another Activity
206) Fragment Dialog
207) FragmentDialog Or Activity
208) Gallery View
209) Get ActivityManager
210) Get CheckBox value
211) Get data from RadioButton
212) Get Item index in item click event
213) Get ListActivity selected index
214) Get Menu title
215) Get text from EditText
216) Get value from EditText
217) Get Widget Id
218) Getset Gallery Show Mode
219) Google map view
220) Graph View
221) Gravity setting inside a TableLayout
222) GridView layout
223) Help Dialog Creator
224) Helper Alert
225) Honeycomb Gallery
226) Horizontally centers the content of the cell
227) How a well behaved view with internal selection InternalSelectionView can cause its parent android widget ScrollView to scroll to keep
228) Image String Drawer
229) ImageButton Demo
230) ImageView background
231) ImageView click listener
232) Implements AdapterView OnItemSelectedListener
233) Implements ListAdapter
234) Import android app AlertDialog
235) Inflate Layout
236) Is CheckBox selected
237) Is ToggleButton selected
238) Layout align Baseline, align Right
239) Layout Animation
240) Layout animation row left slide
241) Layout bottom to top slide
242) Layout Button inside Activity
243) Layout dialog with xml layout file
244) Layout gravity bottom
245) Layout gravity center vertical
246) Layout grid fade
247) Layout grid inverse fade
248) Layout input form
249) Layout Orientation
250) Layout Radio buttons with RadioGroup
251) Layout random fade
252) Layout Utils
253) Layout wave scale
254) Layout widget with code only
255) Life cycle
256) LinearLayout for ListAdapter
257) LinearLayout inside ScrollView
258) LinearLayout which uses a combination of wrap_content on itself and match_parent on its children to get every item to be the same width
259) Link form with POJO
260) List item click event
261) List selection event
262) ListAdapter for use with HiberDroid Criteria Results (Lists)
263) Listen EditText event
264) Listen to CheckBox action
265) Listening to checked change events
266) ListView CHOICE_MODE_MULTIPLE
267) Load Button from layout xml file and add action listener
268) Load image from remote host to WebView
269) Load image with ImageView
270) Load Layout from xml layout file
271) Load local resource into WebView
272) Load remote web page for WebView
273) Load static html file into WebView
274) Load Url to WebView
275) Lunch List
276) Make Toast Text
277) Making Activity Go Full-Screen
278) Manager Preference with PreferenceActivity
279) Media Store Gallery
280) Menu and messages
281) Menu Inflation
282) More than one Activity
283) MultiAutoCompleteTextView Demo
284) Multi-column ListActivity
285) Named ViewFlipper
286) No code required here to attach the listener
287) Note Editor
288) Notification Activity
289) Ok Dialog Wrapper
290) On nothing selected event
291) OnOptionsItemSelectedonPrepareOptionsMenuonCreateOptionsMenu Event
292) OnRetainNonConfigurationInstance
293) Open First Time Popup
294) Option Menu selection event
295) Parse Uri from EditText control
296) Phone Call Activity
297) Pint View
298) Popup Debug Message
299) Preference dialog
300) PreferenceActivity demo
301) Programmatically load text from an asset and place it into the text view
302) Progress Monitor
303) Provide layout for different screen size
304) Provide xml layout for ListView Item
305) RadioGroup selection Changed Listener
306) Raise a Toast
307) RatingBar Demo
308) Redirect
309) Relative layout demo
310) RelativeLayout TextView and EditView
311) Render Script Demo
312) Render View
313) RenderScript Balls
314) RenderScript Fountain
315) Request window features before setContentView
316) Reslayoutmain xml
317) Responsible for sending Toasts under all circumstances
318) Rotation demo
319) Round ProgressBar vs Flat ProgressBar
320) Sample creating 10 webviews
321) Save data to Preference
322) Save instance state
323) Scale listener
324) Scrolling with a ScrollView
325) Securer Activity
326) Self Wrapper for List
327) Set 24 hour view for TimePicker
328) Set activity screen Orientation
329) Set baselineAlignedChildIndex
330) Set Button text in xml file
331) Set Button width and height
332) Set content view from xml for Activity
333) Set current hour and minute for TimePicker
334) Set focus
335) Set gravity for TableRow
336) Set handle and content for SlidingDrawer
337) Set Image Bitmap for ImageView
338) Set Image resource for ImageView
339) Set ImageView width, height
340) Set image Uri for ImageView
341) Set initial value for DatePicker
342) Set layout alignment base line
343) Set Layout Parameters in your code
344) Set Layout Parameters, Scale Type, background for ImageView
345) Set ListView Height Based On Children
346) Set min height
347) Set one of the three radio buttons to be selected by default, using android
348) Set Orientation ActivityInfo SCREEN_ORIENTATION_LANDSCAPE
349) Set orientation for SlidingDrawer
350) Set padding right
351) Set padding with dpi value
352) Set right margin
353) Set size for AutoCompleteTextView
354) Set size for TextView
355) Set text for TextView
356) Set text for TextView in xml file
357) Set text Size
358) Set text Size, color, padding and background for TextView
359) Set ToggleButton onoff text
360) Set View background
361) Show Alert
362) Show dialog
363) Show dialog and parse URL
364) Show error AlertDialog
365) Show long,short Toast
366) Show Message
367) Show Notification Alert Dialog
368) Show or hide button
369) Show Title And Message Dialog
370) Show Toast
371) Show Toast in a Thread
372) Show video with VideoView
373) Show Yes No Prompt
374) Shrink a TableLayout
375) Simple List single choice
376) SimpleCursorAdapter and ListActivity
377) Spinner Item Selected Listener
378) Spinner on selection listener
379) Spinner Test
380) Static text for List view
381) Stretch some columns
382) Surface View Test Activity
383) Switch to a TableLayout
384) Tab control
385) Table layout demo
386) Table layout inside a Linear layout
387) TableLayout and padding
388) TableLayout and TableRow
389) TableLayout stretchColumns
390) Tabs that uses labels TabSpec#setIndicator(CharSequence) for indicators and views by id from a layout file TabSpec#setContent(int)
391) Tappable SurfaceView
392) Text Dialog
393) Text input listener
394) The Toast util class
395) This activity is an example of a simple settings screen that has default values
396) This class provides a basic demonstration of how to write an Android activity
397) This demo illustrates the use of CHOICE_MODE_MULTIPLE_MODAL
398) This demo illustrates the use of CHOICE_MODE_MULTIPLE_MODAL, a k a selection mode on GridView
399) This demo illustrates the use of CHOICE_MODE_MULTIPLE_MODAL, a k a selection mode on ListView
400) This demo shows how various action bar display option flags can be combined and their effects
401) This demonstrates idiomatic usage of the Action Bar
402) This demonstrates the basic code needed to write a Screen activity
403) This demonstrates the use of the PopupMenu class Clicking the button will inflate and show a popup menu from an XML resource
404) This example shows how to use cell spanning in a table layout
405) This is a TextView that is Editable and by default scrollable like EditText without a cursor
406) This sample application shows how to use layout animation and various transformations on views
407) Thread demo
408) Timing Activity
409) To do list app
410) Toast and Notification, vibrate and sound
411) Toast LENGTH_SHORT
412) Toast Message Demo
413) Toast with TextView
414) Transform views in 2D and 3D, scaling them, translating them, and rotating them (in 2D and 3D)
415) Transparent Panel extends LinearLayout
416) Two AutoCompleteTextView
417) Usage of SearchView in an ActionBar as a menu item
418) Use AbsListView OnScrollListener(AbsListView OnScrollListener), AbsListView#setOnItemScrollListener(AbsListView OnItemScrollListener)}
419) Use AlertDialog to inform exception
420) Use an indeterminate progress indicator in the windows title bar
421) Use choice mode on a list This list is in CHOICE_MODE_MULTIPLE mode, which means the items behave like checkboxes
422) Use choice mode on a list This list is in CHOICE_MODE_SINGLE mode, which means the items behave like checkboxes
423) Use EditText to accept user input
424) Use LayoutTransition to automate transition animations as items are hidden or shown in a container
425) Use progress bars as widgets and in the title bar The progress bar in the title will be shown until the progress is complete, at which
426) Use RelativeLayout to hold ImageView and AnalogClock
427) Use the animateLayoutChanges tag in XML to automate transition animations as items are removed from or added to a container
428) Uses a right gravity for the TabWidget
429) Uses a TextSwitcher
430) Using a tab content factory for the content via TabHost TabSpec#setContent(android widget TabHost TabContentFactory)
431) Using action bar tabs and how they interact with other action bar features
432) Using AnalogClock
433) Using AutoCompleteTextView
434) Using BaseAdapter
435) Using Button to control MediaPlayer
436) Using DatePicker
437) Using DatePickerDialog
438) Using ExpandableListView
439) Using FrameLayout
440) Using Gallery widget
441) Using GridView
442) Using GridView to display Contact people
443) Using GridView to display images
444) Using GridView to show images
445) Using HorizontalScrollView
446) Using Icon in Menu
447) Using Icon in menu and submenu
448) Using ImageButton
449) Using ImageSwitcher
450) Using ImageSwitcher and CheckBox
451) Using ImageSwitcher and Gallery
452) Using ImageView to display Image
453) Using ImageView to display image and reference Image resource in layout xml file
454) Using ImageView within ListActivity
455) Using indeterminate progress bars as widgets and in the windows title bar
456) Using LayoutInflater
457) Using LayoutParams
458) Using LinearLayout
459) Using LinearLayout for Activity
460) Using LinearLayout LayoutParams
461) Using LinearLayout to layout two RadioGroups
462) Using ListActivity
463) Using ListPreference
464) Using ListView
465) Using Media Store Activity
466) Using more than one layout xml
467) Using MultiAutoCompleteTextView
468) Using PreferenceActivity
469) Using progress bar
470) Using RatingBar
471) Using Reflection to call method
472) Using RelativeLayout to layout controls
473) Using ScrollView to hold a TextView
474) Using SeekBar
475) Using SimpleAdapter to fill data to ListView
476) Using SimpleCursorAdapter
477) Using SimpleCursorAdapter and GridView
478) Using SimpleCursorAdapter and ListView
479) Using Spinner
480) Using static string in layout xml file from strings xml
481) Using switch statement to check the RadioButton selection
482) Using TabActivity
483) Using TabHost
484) Using TableLayout and TableRow to display color
485) Using TableLayout to create input form
486) Using Thread and Progress bar
487) Using three adjacent InternalSelectionView that report interesting rects when giving up focus
488) Using TimePicker
489) Using TimePicker and setOnTimeChangedListener
490) Using TimePickerDialog
491) Using Toast LENGTH_SHORT
492) Using two layout xml file for one Activity
493) Using View to separate TableRow
494) Using ViewFlipper
495) Using ViewWrapper
496) Using WebView to load static html string
497) Using WebView to load url
498) Velocity tracker Demo
499) View attached to window event
500) View inflate
501) Weather List Widget
502) Widget Preview Activity
503) Wrapper activity demonstrating the use of {@link GLSurfaceView} to display translucent 3D graphics